﻿ 

 

// ******************************************************
// 这段代码是自动生成的
// 修改里面的代码，下次生成的时候会被覆盖
// ******************************************************
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using System.Threading.Tasks;
using Sharp.Application;
using Sharp.DataTransferObject;
using System.ServiceModel.Activation;
using Sharp.Infrastructure.Search;
using Sharp.ServiceContracts;
using Sharp.Infrastructure;
using Sharp.Infrastructure.IoC;
namespace Sharp.Services.Controllers
{
	[AllowAnonymous]
	public class OAuthServiceController : ApiController,IOAuthService
	{
		private readonly IOAuthService _impl = ServiceLocator.Instance.GetService<IOAuthService>();
		
		
		public Boolean RemoveOldTicket(AuthorizationDTO grantData)
		{
			 return _impl.RemoveOldTicket(grantData);
		}
		
		
		public Boolean SetTicketValue(AuthorizationDTO tokenValue)
		{
			 return _impl.SetTicketValue(tokenValue);
		}
		
		
		public AuthorizationDTO GetTicketValue(String token)
		{
			 return _impl.GetTicketValue(token);
		}

		/// <summary>
        /// 为客户端ajax跨域请求必须的方法
        /// </summary>
        /// <returns></returns>
        public string Options()
        {
            // HTTP 200 response with empty body
            return null;
        }
	}
}